ggplotly(heat_map_pm2.5)
For ED Admissions:
# Create ED Visits Map
ed_plot <- ggplot() +
geom_sf(data = filter(map_data, indicator == "ed_visits_rate"),
aes(fill = avg_rate)) +
facet_wrap(~period) +
scale_fill_viridis_c(
name = "Borough Average of\nED Visit Rates\nper 10,000 Children\nAged 0-17 Years",
option = "plasma"
) +
theme_minimal() +
labs(title = "Asthma ED Visit Rates by NYC Borough",
subtitle = "Children aged 0-17 years") +
theme(
plot.title = element_text(size = 12),
legend.position = "right",
legend.key.height = unit(2, "cm")
)
# Display plot
ggplotly(ed_plot)
Looking at the ED visit rates map across the two time periods (2016-2018 and 2019-2021), we can observe several key patterns:
The most striking change between the two periods is the apparent reduction in ED visits during 2019-2021, which could potentially be related to the COVID-19 pandemic’s impact on healthcare utilization patterns.
For ED hospitalizations, compared to ED Admissions rates:
# Create Hospitalizations Map
hosp_plot <- ggplot() +
geom_sf(data = filter(map_data, indicator == "hosp_rate"),
aes(fill = avg_rate)) +
facet_wrap(~period) +
scale_fill_viridis_c(
name = "Borough Average of\nHospitalization Rates\nper 10,000 Children\nAged 0-17 Years",
option = "plasma"
) +
theme_minimal() +
labs(title = "Asthma Hospitalization Rates by NYC Borough",
subtitle = "Children aged 0-17 years") +
theme(plot.title = element_text(size = 12))
# Display plot
ggplotly(hosp_plot)